<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<link rel="stylesheet" type="text/css" href="/admin/res/style.css">
<link rel="stylesheet" type="text/css" href="/admin/res/index.css">
<script src="/admin/res/jquery.min.js"></script>
<script src="/admin/res/cookie.js"></script>
<script src="/admin/res/layindex.js"></script>
<script>
	$(function() {
		$(".del").click(function() {
			var href = $(this).attr("href");
			$("form").attr("action", href).submit();
			return false;
		});

	})
</script>
</head>
<body class="mainbody">

<a href="add" class="btn btn-primary" ><i class="fa fa-plus"></i>新增</a>
<a href="taxis" class="btn btn-warning" ><i class="fa fa-sort-amount-asc"></i>保存排序</a>
<a href="del"  class="btn btn-danger" ><i class="fa fa-trash-o"></i>删 除</a>

<div calss="line20"></div>

	<form action="" method="POST">
		<input type="hidden" name="_method" value="DELETE" />
	</form>
<table class="table table-striped table-hover" border="0" cellpadding="0" cellspacing="0"  id="userTable">
            <thead>
                <tr>
                    <th width="40">ID</th>
                    <th width="180">模板名称</th>
                    <th width="150">文件地址</th>
                    <th width="100">模板类型</th>
                    <th width="150">修改日期</th>
					<th width="150">创建日期</th>                 
                    <th >操作</th>
                </tr>
            </thead>
            <tbody>
            <c:forEach items="${requestScope.tpllist }" var="model">
				<tr>
					<td>${model.id }</td>					
					<td>${model.title }</td>				
					<td>${model.fileaddr }  ${model.isdefault?"默认":"" }</td>	
					<td>${model.filetype }</td>	
					<td>${model.lasttime }</td>
					<td>${model.dateCreated }</td>
					<td><a href="add/${model.id }">编辑</a>
					<a class="del" href="del/${model.id }">删除</a></td>
				</tr>
			</c:forEach>
            </tbody>
        </table>




</body>
</html>